Xbasic
a5_ai_transcribe_speech Function
Syntax
c a5_ai_transcribe_speech(c namedresource, c audiofile)
Arguments
- namedresource
Named resource for specifying ai server to use, api key, model and settings.
- audiofile
Name of an existing audiofile to send to the AI to transcribe.
Returns
- result
Text transcription of audio file from the endpoint, otherwise and error string with '#Error' prefix
Description
Request an AI transcription model to convert the audio file to a text transcription.
Example
' Note - in this case the AI provider was 'openai' and the model was 'whisper-1'
? a5_ai_transcribe_speech("aiwhisper", "c:\audio\test.mp3")
= "This is a test audio file"